package cn.jxau.bean.po;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotations.KeySequence;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

/**
 * 角色表
 * @author lpy
 *
 */
@TableName("t_reply")
@KeySequence("t_sequence_reply")
public class Reply implements Serializable{
	private static final long serialVersionUID = 1L;
	@TableId(type=IdType.INPUT)
	private Long id;//主键
	private Long sendID;//发送者ID
	private Long receiveID;//接受者ID
	private Long pid; //评论ID
	private String content; //回复 
	private Date tDate; //回复时间
	
	private User sendInfo;
	private User receiveInfo;
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Long getSendID() {
		return sendID;
	}
	public void setSendID(Long sendID) {
		this.sendID = sendID;
	}
	public Long getReceiveID() {
		return receiveID;
	}
	public void setReceiveID(Long receiveID) {
		this.receiveID = receiveID;
	}
	public Long getPid() {
		return pid;
	}
	public void setPid(Long pid) {
		this.pid = pid;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Date gettDate() {
		return tDate;
	}
	public void settDate(Date tDate) {
		this.tDate = tDate;
	}
	public User getSendInfo() {
		return sendInfo;
	}
	public void setSendInfo(User sendInfo) {
		this.sendInfo = sendInfo;
	}
	public User getReceiveInfo() {
		return receiveInfo;
	}
	public void setReceiveInfo(User receiveInfo) {
		this.receiveInfo = receiveInfo;
	}
	@Override
	public String toString() {
		return "Reply [id=" + id + ", sendID=" + sendID + ", receiveID=" + receiveID + ", pid=" + pid + ", content="
				+ content + ", tDate=" + tDate + ", sendInfo=" + sendInfo + ", receiveInfo=" + receiveInfo + "]";
	}
	public Reply(Long id, Long sendID, Long receiveID, Long pid, String content, Date tDate, User sendInfo,
			User receiveInfo) {
		super();
		this.id = id;
		this.sendID = sendID;
		this.receiveID = receiveID;
		this.pid = pid;
		this.content = content;
		this.tDate = tDate;
		this.sendInfo = sendInfo;
		this.receiveInfo = receiveInfo;
	}
	public Reply() {
		super();
		// TODO Auto-generated constructor stub
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((content == null) ? 0 : content.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((pid == null) ? 0 : pid.hashCode());
		result = prime * result + ((receiveID == null) ? 0 : receiveID.hashCode());
		result = prime * result + ((receiveInfo == null) ? 0 : receiveInfo.hashCode());
		result = prime * result + ((sendID == null) ? 0 : sendID.hashCode());
		result = prime * result + ((sendInfo == null) ? 0 : sendInfo.hashCode());
		result = prime * result + ((tDate == null) ? 0 : tDate.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Reply other = (Reply) obj;
		if (content == null) {
			if (other.content != null)
				return false;
		} else if (!content.equals(other.content))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (pid == null) {
			if (other.pid != null)
				return false;
		} else if (!pid.equals(other.pid))
			return false;
		if (receiveID == null) {
			if (other.receiveID != null)
				return false;
		} else if (!receiveID.equals(other.receiveID))
			return false;
		if (receiveInfo == null) {
			if (other.receiveInfo != null)
				return false;
		} else if (!receiveInfo.equals(other.receiveInfo))
			return false;
		if (sendID == null) {
			if (other.sendID != null)
				return false;
		} else if (!sendID.equals(other.sendID))
			return false;
		if (sendInfo == null) {
			if (other.sendInfo != null)
				return false;
		} else if (!sendInfo.equals(other.sendInfo))
			return false;
		if (tDate == null) {
			if (other.tDate != null)
				return false;
		} else if (!tDate.equals(other.tDate))
			return false;
		return true;
	}
	
	
}
